<script setup lang="ts">

import type { ChannelItem } from '@/types';

defineProps
  <{
    channels: ChannelItem[],
    activeId:number
  }>()
const emits = defineEmits<{
    "checkTabBar":[activeId:number]
}>()
</script>

<template>
  <div class="channel-nav">
    <nav class="list">
      <a @click="emits('checkTabBar',item.id)"
        class="item"
    :class="{active:activeId===item.id}"
        v-for="item in channels"
        href="javascript:;"
    
        :key="item.id"
      >
        {{ item.name }}
      </a>
    </nav>
  </div>
</template>